//
//  GLNavigationBar.m
//  GLSliderView
//
//  Created by 张国梁 on 15/11/28.
//  Copyright © 2015年 CoderGL. All rights reserved.
//

#import "GLNavigationBar.h"

@implementation GLNavigationBar

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    for (UIButton *btn in self.subviews) {
        if (![btn isKindOfClass:[UIButton class]]) continue;
        
        if (btn.x < self.width * 0.5) {
            btn.x = 0;
        } else {
            btn.x = self.width - btn.width;
        }
        
    }
    
    
}


@end
